package android.app;

import android.content.Intent;
import android.os.IBinder;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author slc
 * @date 2022/03/30 下午 4:28
 */
public class NotificationManager extends Service {

    /**
     * Value signifying that the user has not expressed a per-app visibility override value.
     *
     * @hide
     */
    public static final int VISIBILITY_NO_OVERRIDE = -1000;

    /**
     * Value signifying that the user has not expressed an importance.
     * <p>
     * This value is for persisting preferences, and should never be associated with
     * an actual notification.
     */
    public static final int IMPORTANCE_UNSPECIFIED = -1000;

    public static final int IMPORTANCE_NONE = 0;

    public static final int IMPORTANCE_MIN = 1;

    public static final int IMPORTANCE_LOW = 2;

    public static final int IMPORTANCE_DEFAULT = 3;

    public static final int IMPORTANCE_HIGH = 4;

    public static final int IMPORTANCE_MAX = 5;
    private final Map<String, NotificationChannel> notificationChannelMap = new ConcurrentHashMap<>();

    public NotificationChannel getNotificationChannel(String channelId) {
        return notificationChannelMap.get(channelId);
    }

    public NotificationChannel createNotificationChannel(NotificationChannel notificationChannel) {
        return notificationChannelMap.get(notificationChannel.getId());
    }


    public void deleteNotificationChannel(String channelId) {
        notificationChannelMap.remove(channelId);
    }

    @Override
    public IBinder onBind(Intent arg0) {
        return null;
    }
}
